<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 

  <head>
    <base target="_self"/>  
    <title>表单信息修改页面</title>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <%@ include file="../jslib/jquerylib.jsp" %>
    <script type='text/javascript' src="<%=request.getContextPath() %>/js/DatePicker/WdatePicker.js" defer="defer"></script> 
    <link rel="stylesheet" type="text/css" href="<%=path %>/web/style/layout.css" />
    <script type="text/javascript" src="<%=path %>/jqGrid/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="<%=path %>/js/jquery.validate.min.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath() %>/js/additional-methods.js"></script>
    <script type='text/javascript' src="<%=request.getContextPath() %>/js_css_image/js/base/jquery.form.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/js/jqueryui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/js/jqueryui/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/js/jqueryui/demo.css">
	<script type="text/javascript" src="<%=request.getContextPath() %>/js/jqueryui/jquery.easyui.min.js"></script>
    <c:if test="${requestScope.message!=null}">
				<script type="text/javascript">
	  	 		     alert('<c:out value="${requestScope.message}"></c:out>');
	  	 		     window.close();	  	 		 
	  			</script>
	        </c:if>
    <script type="text/javascript">
    var api = frameElement.api, W = api.opener;
    $().ready(function() {
    	specialType();
	/*$("#pageFrom").validate({
		onkeyup :false,onclick:false,
			rules: {
				fromColumn:{
					required:true,
					number:true
				}
			},
		messages: {
			fromColumn:{
				required:"表单列数不能为空",
				number:"表单列数只能为数字"
			}
		},  
	   showErrors : function(errorMap, errorList) {
		    var msg = "";  
		    $.each(errorList, function(i, v) {  
		     msg = (v.message + "\r\n");  
		    
		    if (msg != ""){  
		     alert(msg);
		     return false;  
		     }
		     });  
		   onfocusout=false; 
	   }
	  });  */
	  
	/*var options = {
  	    url:'updateAutoFroms.action',
  	    beforeSubmit: function() {
    		return $('#pageFrom').form('enableValidation').form('validate');
    	},
  	    dataType:'json',
  	    success: function(data) {
  	      if(data.result=='success'){
			alert("修改成功");
			api.close();
			W.refreshIt();
  	      }else{
  	      	alert("系统繁忙，请您稍后再试！");
  	      	api.close();
			W.refreshIt();
  	      }
  	    }};
		$('#saveBtn').click(function(){
			    	$('#pageFrom').ajaxSubmit(options);
	 	            return false;
    	 });*/
		$('#closeBtn').click(function(){
			api.close();
    	 });
    	 
});

function selectformtype(){
		var k = window.showModalDialog('autoFromsAction!getDicselectviewinfo.action?id=321',null,"dialogWidth=850px;dialogHeight=430px;resizable=yes");
		if (k==undefined)
		{
			k = '';
		}
		document.getElementById("suoslx").value = k;
	}
	function specialType(){
		if(${af.specialColumn =='3' } || ${af.specialColumn =='4' } ){
		
			document.getElementById("r1").style.display="";
			document.getElementById("r2").style.display="";
		}else{
			document.getElementById("r1").style.display="none";
			document.getElementById("r2").style.display="none";
		}
	}
   </script>
  			 
	<style type="text/css">
 		body{
 			background:#ffffff; background-image:url(images/);
 		}
   </style>
  </head> 
  <body>
    <form action="" id="pageFrom" name="" method="post" class="easyui-form" data-options="novalidate:true">
    <input type="hidden" id="formId" name="formId" value="${af.id}"/>
    	<table width="100%" border="0" align="center" cellpadding="5" cellspacing="5" class="formTableNew">
		   <tr>
		    <td align="right">表单中文名称：</td>
		    <td align="left">
				<input type="text" id="formCnName" name="formCnName" value="${af.formCnName }" disabled="disabled" style="border: 1px solid #999;padding: 5px;width: 250px;"/>
				<img src="<%=request.getContextPath() %>/images/xh.png"></img>
		    </td>
		    <td align="right">表单英文名称：</td>
		    <td align="left">
				<input type="text" id="formEnName" name="formEnName" value="${af.formEnName }" disabled="disabled" style="border: 1px solid #999;padding: 5px;width: 250px;"/>
				<img src="<%=request.getContextPath() %>/images/xh.png"></img>
		    </td>
		  </tr>
		  <tr>
		    <td align="right">表单宽：</td>
		    <td> 
				<input class='easyui-numberbox' type="text" id="formwidth" name="formwidth" value="${af.formwidth }" disabled="disabled" style="border: 1px solid #999;padding: 5px;width: 250px;"/>
		    </td>
		    <td align="right">表单高：</td>
		    <td> 
				<input class='easyui-numberbox' type="text" id="formheight" name="formheight" value="${af.formheight }" disabled="disabled" style="border: 1px solid #999;padding: 5px;width: 250px;"/>
		    </td>
		  </tr>
		  <tr>
		    <td align="right">表单列数：</td>
		    <td> 
				<input type="text" id="formColumn" name="formColumn" value="${af.formColumn }" disabled="disabled" style="border: 1px solid #999;padding: 5px;width: 250px;"/>
				<img src="<%=request.getContextPath() %>/images/xh.png"></img>
		    </td>
		    <td align="right">外键:</td>
			    <td >
			    <input type="text" id="columnForigen" name="columnForigen" value="${af.columnForigen }"  disabled="disabled" style="border: 1px solid #999;padding: 5px;width: 250px;"/>
			    </td>
			</tr>
		  </tr>
		  <tr> 
			    <td align="right">列表中文信息:</td>
			    <td >
			    <textarea rows="5" cols="30" id="columnCnName" name="columnCnName" style="border: 1px solid #999;padding: 5px;" disabled="disabled">${af.columnCnName }</textarea>
			    </td>
			    <td align="right">SQL语句:</td>
			    <td >
			     <textarea rows="5" cols="30" id="columnSql" name="columnSql" style="border: 1px solid #999;padding: 5px;" disabled="disabled">${af.columnSql }</textarea>
			    </td>
			</tr>
		  <tr> 
		    <td align="right">列表字段宽度:</td>
		    <td>
		    <textarea rows="5" cols="30" id="columnWidth" name="columnWidth" style="border: 1px solid #999;padding: 5px;" disabled="disabled">${af.columnWidth }</textarea>
		    </td>
		    <td align="right">其他sql:</td>
			    <td >
			    	<textarea rows="5" cols="30" id="otherColumnSql" name="otherColumnSql" style="border: 1px solid #999;padding: 5px;" disabled="disabled">${af.otherColumnSql }</textarea>
			    </td>
			</tr>
		  <tr> 
		    <td align="right">显示信息:</td>
			<td >
			    <select id="specialColumn"  disabled="disabled" name="specialColumn" onchange="specialType1();" style="border: 1px solid #999;padding: 5px;width: 254px;">
			    	<option value=""></option>
			    	<option <c:if test="${af.specialColumn =='1' }">selected</c:if> value="1">项目分配</option>
			    	<option <c:if test="${af.specialColumn =='2' }">selected</c:if>  value="2">人员分配</option>
			    	<option <c:if test="${af.specialColumn =='3' }">selected</c:if>  value="3">原始记录分配</option>
			    	<option <c:if test="${af.specialColumn =='4' }">selected</c:if>  value="4">报告分配</option>
			    </select>
			</td>
			<td id="r1" >操作类型:</td>
			<td id="r2" >
			    <select name="specialType" disabled="disabled" style="border: 1px solid #999;padding: 5px;width: 254px;">
			    	<option <c:if test="${af.specialType =='1' }">selected</c:if> value="1" >编辑</option>
			    	<option <c:if test="${af.specialType =='2' }">selected</c:if> value="2" >查看</option>
			    </select>
			</td>
		  </tr>
		  <tr >
		  	<td align="right">表单说明：</td>
		    <td align="left" colspan="3" >
		    <div class="div">
				<textarea rows="5" cols="87" id="formNote" disabled="disabled" name="formNote" onkeydown="countlen(this);" style="border: 1px solid #999;padding: 5px;">${af.formNote }</textarea>
			</div>
		    </td>
		  
		  </tr>
		  <tr>
		    <td align="center" colspan="4" >
		      	<input type="button" id="closeBtn" value="关 闭" class="form_bt_grey" />
		    </td>
		  </tr>
		</table>
	</form>
  </body>
</html>
